{% extends "admin/admin_base.html" %}


{% block content %}
<div class="box box-success">
    <div class="box-header with-border">
        <i class="fa fa-book"></i>
        <h3 class="box-title">所有用户展示</h3>
    </div>

    <div class="box-body">

        <!-- 数据表格 -->
        <div class="table-box">

            <!--数据列表-->
            <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                <thead>

                <tr>
                    <th class="">id</th>
                    <th class="">名称</th>
                    <th class="">手机号</th>
                    <th class="">创建时间</th>
                    <th class="">状态</th>
                    <th class="">管理员</th>
                    <th class="text-center">操作</th>
                </tr>

                </thead>
                <tbody>
                {% for user in user_queryset %}
                <tr>
                    <td>{{ user.id }}</td>
                    <td>{{ user.username }}</td>
                    <td>{{ user.phone }}</td>
                    <td>{{ user.create_time }}</td>
                    <td>{{ user.is_delete }}</td>
                    <td>{{ user.is_admin }}</td>
                    <td class="text-center">
                        <a class="btn bg-olive btn-xs" href="{{url_for('admin.edit_user',id=user.id)}}">编辑
                        </a>
                        <a class="btn bg-danger btn-xs"
                           href="{{url_for('admin.delete_user',id=user.id)}}">删除
                        </a>
                    </td>
                </tr>
                {% endfor %}

                </tbody>
            </table>
            <!--数据列表/-->

        </div>
        <!-- 数据表格 /-->

    </div>
    <!-- /.box-body -->

</div>
{% endblock %}

